<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>用 CSS 编写属于自己的切换按钮</title>
  <link rel="stylesheet" href="./style.css">
</head>

<body>
  <div class="box">
    <input type="checkbox" id="checkbox" class="toggle" />
    <label for="check">开启</label>
  </div>

  <br />

  <div class="box">
    <input disabled type="checkbox" id="checkbox" class="toggle" />
    <label for="check">开启</label>
  </div>
</body>

</html>